package com.example.demo.hello;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: jerome
 * @Date: 2022/3/9 17:28
 */
@RestController
public class HelloWorldController {

    @RequestMapping("/hello")
    public String index() {
        return "Hello World";
    }
    @RequestMapping("/a")
    public String a() {
        return "Ha";
    }

    @RequestMapping(value = "/c",method = RequestMethod.GET)
    public String c(@RequestParam Integer start) {
        if (start  == 1){
            return "1";
        }else {
            return "2";
        }
    }
}
